﻿<UserControl x:Class="Esponce.Views.TrackImportView"
  xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
  xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
	xmlns:m="clr-namespace:Esponce.Models"
	xmlns:v="clr-namespace:Esponce.Views"
	xmlns:control="clr-namespace:LoadingControl.Control"
  mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="400">
	<UserControl.DataContext>
		<m:TrackImportViewModel />
	</UserControl.DataContext>
  <Grid x:Name="LayoutRoot">
		<Grid.RowDefinitions>
			<RowDefinition Height="Auto" />
			<RowDefinition Height="10" />
			<RowDefinition Height="*" />
		</Grid.RowDefinitions>

		<!-- Input parameters -->
		<TextBlock Grid.Row="0" Text="IMPORT DATA" Style="{StaticResource TitleStyle}" />

		<Border Grid.Row="2" Style="{StaticResource BorderStyle}" AllowDrop="True" MouseLeftButtonDown="Border_MouseLeftButtonDown" Drop="Border_Drop">
			<Grid Margin="20">

				<!-- Instructions-->
				<TextBlock Text="(drag and drop file or click here)" IsHitTestVisible="False" HorizontalAlignment="Center" VerticalAlignment="Center" Visibility="{Binding IsLoading, Converter={StaticResource VisibilityConverter}, ConverterParameter='Invert'}" />

				<!-- Loading animation -->
				<control:LoadingAnimation HorizontalAlignment="Center" VerticalAlignment="Center" IsHitTestVisible="False" IsLoading="{Binding IsLoading}" Visibility="{Binding IsLoading, Converter={StaticResource VisibilityConverter}}" />

			</Grid>
		</Border>

	</Grid>
</UserControl>
